package cn.itcast.SellTicekts;
//多线程安全问题，因为CPU是在多个线程之间随机切换，会出现多个线程任务抢占同一资源的情况。
public class SellTicektDemo {
    public static void main(String[] args) {
        //创建一个线程任务对象
        SellTicektThread ST = new SellTicektThread();
        //创建线程对象t1,t2,t3
        Thread t1 = new Thread(ST,"五杀");
        Thread t2 = new Thread(ST,"二哥");
        Thread t3 = new Thread(ST,"老三");
        Thread t4 = new Thread(ST,"大哥");
        t1.start();
        t2.start();
        t3.start();
        t4.start();
    }
}
